package com.ruoyi.system.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.system.domain.WdyRecharge;
import com.ruoyi.system.dto.RechargeCallback;
import org.springframework.transaction.annotation.Transactional;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * 充值 服务层
 * 
 * @author ruoyi
 * @date 2019-12-15
 */
public interface IWdyRechargeService extends IService<WdyRecharge>
{
	/**
     * 查询充值信息
     * 
     * @param id 充值ID
     * @return 充值信息
     */
	public WdyRecharge selectWdyRechargeById(Long id);
	
	/**
     * 查询充值列表
     * 
     * @param wdyRecharge 充值信息
     * @return 充值集合
     */
	public List<WdyRecharge> selectWdyRechargeList(WdyRecharge wdyRecharge);
	
	/**
     * 新增充值
     * 
     * @param wdyRecharge 充值信息
     * @return 结果
     */
	public int insertWdyRecharge(WdyRecharge wdyRecharge);
	
	/**
     * 修改充值
     * 
     * @param wdyRecharge 充值信息
     * @return 结果
     */
	public int updateWdyRecharge(WdyRecharge wdyRecharge);
		
	/**
     * 删除充值信息
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	public int deleteWdyRechargeByIds(String ids);

    @Transactional(rollbackFor = Exception.class)
    Map<String, Object> recharge(WdyRecharge recharge);

	public BigDecimal getSum(WdyRecharge recharge);

    void rechargeCallback(RechargeCallback callback);

    @Transactional(rollbackFor = Exception.class)
    void rechargeAdmin(WdyRecharge recharge);
}
